package com.atguigu.标准代码;

import java.io.*;

public class 高效字符流一次一个字符复制字符文件 {
    public static void main(String[] args) throws IOException {
        //创建流
        BufferedReader br = new BufferedReader(new FileReader("源文件地址"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("目标文件地址"));
        //循环读写
        int ch;
        while((ch = br.read()) != -1){
            //读一个字符写一个字符
            bw.write(ch);
            //不需要写刷新
        }

        //关流
        br.close();
        bw.close();
    }
}
